package com.cmii.sjw.department.control.request.bean;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.Setter;

import java.util.HashMap;
import java.util.Map;

/**
 * 数据接口的所有调用参数遵循这个模板
 * 接口的自定义参数放入params中
 */
@Getter
@Setter
@AllArgsConstructor
public class DataRequest {
    /**
     * 数据接口参数
     */
    private Map<String, String> params;

    /**
     * 分页参数
     */
    private int pageNum;

    /**
     * 分页大小
     */
    private int pageSize;

    public DataRequest(Map<String, String> params) {
        this.params = params;
        this.pageNum = 1;
        this.pageSize = 50;
    }

    public DataRequest() {
        this(new HashMap<>(), 1, 10);
    }
}
